<?php
/* @var $this GroupsController */
/* @var $model Groups */
/* @var $form CActiveForm */
?>

	
	<?php $form=$this->beginWidget('CActiveForm', array(
		'id'=>'groups-form',
		'enableAjaxValidation'=>false,
		'htmlOptions'=>array('rel' =>Yii::app()->createUrl('event/index', array('group'=>Yii::app()->request->getParam('group')))),
	)); ?>
	
		<?php echo $form->errorSummary($model); ?>
	
		
		<table class="flds_form">
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'name'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'name',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'name'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'description'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textArea($model,'description',array('class'=>'settings_fld','rows'=>6, 'cols'=>50)); ?>
						</div>
						<?php echo $form->error($model,'description'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'country_id'); ?>
				</td>
				<td class="flds_form_r">
					<div class="select_block long">	
						<?php echo $form->dropDownList($model,'country_id',CSelect::items('Country'),  array('empty' => ('Выберите страну'))); ?>
						<?php echo $form->error($model,'country_id'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'place'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php echo $form->textField($model,'place',array('class'=>'settings_fld', 'size'=>60,'maxlength'=>255)); ?>
						</div>
						<?php echo $form->error($model,'place'); ?>
					</div>
				</td>
			</tr>
			<tr>
				<td class="flds_form_l">
					<?php echo $form->labelEx($model,'begin'); ?>
				</td>
				<td class="flds_form_r">
					<div class="flds_border">
						<div class="flds_border_inside">
							<?php                    
								$this->widget('zii.widgets.jui.CJuiDatePicker', array(
								    'name'=>'begin',
						       		'language'=>'ru',
						       		'model' => $model,
						       		'attribute' => 'begin',
								    // additional javascript options for the date picker plugin
								    'options'=>array(
								        'showAnim'=>'fold',
							    		'dateFormat'=>'yy-mm-dd',
								    ),
								    'htmlOptions'=>array(
								        'class'=>'settings_fld', 
								        'size'=>60,
								        'maxlength'=>255,
								    ),
								));                          
					        ?> 
							
						</div>
						<?php echo $form->error($model,'begin'); ?>
					</div>
				</td>
			</tr>
		</table>
		<?php echo $form->hiddenField($model,'avatar'); ?>
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Добавить мероприятие' : 'Сохранить изменения', array('class'=>'green_btn tac')); ?>
	<?php $this->endWidget(); ?>